//
//  HXDLikeTableViewCell.m
//  qingDaoCircleOfLife
//
//  Created by huxuedong on 15/11/27.
//  Copyright © 2015年 huxuedong. All rights reserved.
//

#import "HXDLikeTableViewCell.h"
#import <UIImageView+WebCache.h>

@interface HXDLikeTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *iconImage;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *starImage;
@property (weak, nonatomic) IBOutlet UILabel *scoreLabel;
@property (weak, nonatomic) IBOutlet UILabel *introLabel;

@end

@implementation HXDLikeTableViewCell

+ (instancetype)likeTableViewCell {
    return [[NSBundle mainBundle] loadNibNamed:@"HXDLikeTableViewCell" owner:nil options:nil].lastObject;
}

- (void)setLike:(HXDLikeModel *)like {
    _like = like;
    self.titleLabel.text = like.title;
    self.introLabel.text = like.info;
    self.scoreLabel.text = [NSString stringWithFormat:@"%@.0分",like.score];
    [self.iconImage sd_setImageWithURL:[NSURL URLWithString:like.icon]];
    self.starImage.image = [UIImage imageNamed:[NSString stringWithFormat:@"star_%@",like.score]];
}

@end
